using NodeCanvas.Variables;

namespace NodeCanvas.Actions
{
	[Name("Set Mecanim Trigger")]
	[EventListener(new string[] { "OnAnimatorIK" })]
	public class MecanimSetLookAt : MecanimActions
	{
		public BBGameObject targetPosition;

		public BBFloat targetWeight;

		protected override string info
		{
			get
			{
				return "Mec.SetLookAt " + targetPosition;
			}
		}

		public void OnAnimatorIK()
		{
			base.animator.SetLookAtPosition(targetPosition.value.transform.position);
			base.animator.SetLookAtWeight(targetWeight.value);
			EndAction();
		}
	}
}
